// 导入数据库操作模块
const db = require('../db/index')

exports.countCT = (req, res) => {
    const sql = `select count(*) as num from ct`
    db.query(sql, (err, results) => {
        if (err) return res.er(err.message)
        res.send({
            status: 0,
            message: '获取信息成功！',
            data: results
        })
    })
}

exports.countMRI = (req, res) => {
    const sql = `select count(*) as num  from mri`
    db.query(sql, (err, results) => {
        if (err) return res.er(err.message)
        res.send({
            status: 0,
            message: '获取信息成功！',
            data: results
        })
    })
}

exports.countUser = (req, res) => {
    const sql = `select count(*) as num from tp_user`
    db.query(sql, (err, results) => {
        if (err) return res.er(err.message)
        res.send({
            status: 0,
            message: '获取信息成功！',
            data: results
        })
    })
}